<template>
  <div class="mui-numbox" data-numbox-min="1" :data-numbox-max="max" style="height:25px">
    <button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
    <input
      id="test"
      class="mui-input-numbox"
      type="number"
      ref="ballRef"
      :value="count"
      readonly
      @change="changeCount"
    >
    <button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
  </div>
</template>
<script>
import mui from "../../lib/MUI/dist/js/mui.min.js";
export default {
  data() {
    return {
      countnum: ""
    };
  },
  methods: {
    changeCount() {
      this.$store.commit("changeCount", {id: this.id + "", count: this.$refs.ballRef.value} );
    }
  },
  mounted() {
    mui(".mui-numbox").numbox()
  },
  props: ["count","max","id"]
};
</script>
style <style lang="scss" scoped>
</style>
